Chapter 5 - Using Macintosh Windows
This chapter shows you how to use QuickDraw GX view ports to draw QuickDraw GX images to Macintosh windows. It also shows you how to
create view port hierarchies and how to use those hierarchies when
resizing and scrolling windows.Specifically, this chapter contains three recipes:
You should follow the instructions from these first recipes in order; each recipe builds on the previous one.
- "Attaching a View Port to a Macintosh Window" shows you how to create
a Macintosh window and a QuickDraw GX view port object and attach the view port to the window. When you draw shapes into the view port, QuickDraw GX renders them in the window.- "Resizing and Zooming a Window" shows how to add a resize box and zoom box to your Macintosh window and how to add a child view port to your view port object, creating a view port hierarchy. You can use the child view port to clip shapes drawn to the window.
- "Adding Scrolling to a Window" shows how to add scroll bars to your window and how you can set the mapping of your child view port to implement scrolling.
You should be familiar with the code in the recipes from Chapter 4, "Using the QuickDraw GX Environment," before you use the recipes in this chapter.
Chapter Contents
- Attaching a View Port to a Macintosh Window
- Overview of Recipe Steps
- Functions Used in This Recipe
- Recipe Step Descriptions
- Related Recipes
- Resizing and Zooming a Window
- Overview of Recipe Steps
- Functions Used in This Recipe
- Recipe Step Descriptions
- Related Recipes
- Adding Scrolling to a Window
- Overview of Recipe Steps
- Functions Used in This Recipe
- Recipe Step Descriptions
- Related Recipes